#ifndef __MCDRAWLINESEGMENTCOMMAND_H_
#define __MCDRAWLINESEGMENTCOMMAND_H_

#include <MCCommand.h>
#include <MCSegmentVisual.h>
#include <mclinesegmentparametricwindow.h>

enum MCSegmentDrawingStage
{
    SetStartPoint = 0,
    SetEndPoint,
    ParametricWindow
};

class MCDrawLineSegmentCommand : public MCCommand
{
public:

    MCDrawLineSegmentCommand(MCCommandManager *commandManager);
    ~MCDrawLineSegmentCommand();

    void onMouseDown(IMouseArgs &args) override;
    void onMouseUp(IMouseArgs &args) override;
    void onMouseMove(IMouseArgs &args) override;

    void terminate() override;

private:

    MCSegmentVisual *_visual;
    MCLineSegment2D _segment;
    MCSegmentDrawingStage _currentStage;
    MCPoint2D _startPoint;
    MCPoint2D _endPoint;

    MCLineSegmentParametricWindow *_parametricWindow;

};

#endif // !__MCDRAWLINESEGMENTCOMMAND_H_
